multiplication of algebraic terms